package com.leenleda.ips;

import android.app.Application;
import android.content.Context;

import androidx.multidex.MultiDex;
import androidx.multidex.MultiDexApplication;

import com.leenleda.ips.util.MyCrash;

public class MyApplication extends MultiDexApplication {

    private static String tag = "MyApplication";
    public static MyApplication getInstance() {
        return context;
    }

//    public static BaseInfo getInfo(int state){
//        ILog.i(tag, "=====state===" + state);
////        if (info == null)
////            info = FileUtils.getDeviceInfo();
//        return FileUtils.getDeviceInfo();
//    }
//
//    public static void revertInfo(){
//        info = null;
//        Utils.putString("deviceInfo", "");
//    }

    private static MyApplication context;

//    private static BaseInfo info;

    @Override
    public void onCreate() {
        super.onCreate();
        try {
            Thread.setDefaultUncaughtExceptionHandler(new MyCrash());
        } catch (Exception e) {
            e.printStackTrace();
        }
        context = this;


//        BaseInfo info = getInfo(11);
//        Constant.cacheSize = info.getCacheSize() == 0 ? 500 : info.getCacheSize();
//        Constant.voiceSpeed = info.getVoiceSpeed() == 0 ? "40" : info.getVoiceSpeed() + "";
//        Constant.voiceRdn = Utils.getStringValue(Utils.getString(Constant.VOICE_RDN));
//        ILog.e("SDNVSVS", "==22=rdn===" + Constant.voiceRdn + "==isEmpty==" + TextUtils.isEmpty(Constant.voiceRdn));
    }

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        MultiDex.install(this);
    }

    /**
     * 德卡（社保身份证）    dc_mate_202109221713.jar libdc_mobile_mate.so libdcrf32.so libwlt2bmp.so<冲突>
     *
     *     身份证旧 libwlt2bmp.so<冲突>
     *
     *
     */
}